import request from '@/plugins/request';
var pre = '/trip';
if (process.env.NODE_ENV !== "development") {
    pre = '/api/sa/epid-prevention' + pre;
}


// 查询出行报备信息
export function getPageForTravel(data) {
    return request({
      url: `${pre}/page`,
      method: "post",
      data,
    });
  }

// 保存出行报备信息
export function saveTravelReport (data) {
    return request({
        url: `${pre}/save`,
        method: 'post',
        data
    });
}
// 查询出行报备详情
export function queryTravelDetail (data) {
    return request({
        url: `${pre}/detail${data}`,
        method: 'get',
    });
}
// 删除出行报备信息
export function deleteTravel (data) {
    return request({
        url: `${pre}/del`,
        method: 'post',
        data
    });
}
// 导出出行报备信息
export function exportTravelReport (data) {
    return request({
        url: `${pre}/export`,
        method: 'post',
        responseType: 'blob',
        data
    });
}

// 出行报备申请提交
export function travelApplySubmit(data) {
    return request({
        url: `${pre}/submit`,
        method: 'post',
        data
    });
}

// 查询出行报备工作流详情
export function queryTravelWorkFlowDetail(data) {
    return request({
        url: `${pre}/workdetail${data}`,
        method: 'get',
    });
}

// 出行报备工作流审批
export function approveTravelApply(data) {
    return request({
        url: `${pre}/approveTravelApply`,
        method: 'post',
        data
    });
}

// 取消出行报备工作流
export function cancelTravelApply(data) {
    return request({
        url: `${pre}/stopWorkflow`,
        method: 'post',
        data
    });
}

// 重新提交出行报备申请-工作流
export function resSaveTripReport(data) {
    return request({
        url: `${pre}/resSave`,
        method: 'post',
        data
    });
}
